<!DOCTYPE html>
<html>
	<head>
		<title>Index of {{ .Path }}</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="icon" href="/static/img/favicon.ico" type="image/x-icon" />
		<link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css">
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.css">
		<style type="text/css">
		body {
			/*background: #F5F5F5;*/
			font-weight: 100;
			font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
		}
		#heading {
			/*padding: 16px 0px 16px 0px;*/
			font-weight: 400;
		}
		.file-name a {
			color: #000000;
		}
		.fa {
			width: 16px;
		}
		.fa-file {
			color: #AAAAAA;
		}
		.fa-folder {
			color: rgb(255 211 66);
		}
		.icon-dir, .icon-file, .icon-up {
			display: inline-block;
			width: 100%;
			margin-left: 16px;
			text-decoration: none ! important;
		}
		.table-head, .table thead th {
			font-weight: 500;
		}
		.footer {
			margin-top: 32px;
			margin-bottom: 32px;
		}
		</style>
		<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
	</head>
	<body>
		{{if .HasPwd}}
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery-cookie/1.0/jquery.cookie.min.js"></script>
		<script>
			promptPwd("{{ .FileId}}");
			function promptPwd(fileId){
				var pwd = prompt("这是一个受保护的文件夹，您需要提供访问密码才能查看。");
				$.cookie("dir_pwd", pwd);
				location.reload();
			}
		</script>
		{{else}}
		<div class="container">
			<div class="row">
				<div class="col s12">
					<h2 id="heading">Index of {{ .Path }}</h2>
				</div>
			</div>
			<div class="row">
				<div class="col s12">
					<table class="table striped highlight responsive-table">
						<thead>
						<tr>
							<th class="file-name"><span class="table-head" data-order-seq="" data-order-type="file-name" style="cursor: default;">Name</span></th>
							<th class="file-size"><span class="table-head" data-order-seq="" data-order-type="file-size" style="cursor: default;">Size</span></th>
							<th class="file-date-modified"><span class="table-head" data-order-seq="" data-order-type="file-date-modified" style="cursor: default;">Date Modified</span></th></th>
							<th class="center-align">Download</th>
						</tr>
						</thead>
						<tbody>
							{{if .HasParent}}
								<tr class="parent">
									<td class="file-name">
										<a class="icon icon-up" href="{{.ParentPath}}"><i class="fa fa-chevron-left" aria-hidden="true"></i>&nbsp;&nbsp;..</a>
									</td>
									<td class="file-size"></td>
									<td class="file-date-modified"></td>
									<td class="file-size"></td>
								</tr>
							{{else}}
							{{end}}
							{{range .List}}
								<tr>
									{{if .IsFolder}}
										<td class="file-name"><a class="icon icon-dir" href="{{.Path}}"><i class="fa fa-folder" aria-hidden="true"></i>&nbsp;&nbsp;{{.FileName}}</a></td>
									{{else}}
										<td class="file-name"><a class="icon icon-file"data-file-type="{{.FileType}}" data-media-type="{{.MediaType}}" data-title="{{.FileName}}" data-url="{{.Path}}" href="javascript:void(0);"><i class="fa fa-file" aria-hidden="true"></i>&nbsp;&nbsp;{{.FileName}}</a></td>
									{{end}}
									<td class="file-size">{{.SizeFmt}}</td>
									<td class="file-date-modified">{{.LastOpTime}}</td>
									{{if .IsFolder}}
										{{if and (ne .FileId "0") (ne .FileId "-12") (ne .FileId "-14") (ne .FileId "-13") (ne .FileId "-15") (ne .FileId "-11") (ne .FileId "-16")}}
											<td class="center-align"><a class="folderDown" data-file-id="{{.FileId}}" href="javascript:void(0);" target="_blank" ><i class="fa fa-download" aria-hidden="true"></i></a></td>
										{{else}}
											<td class="file-size">-</td>
										{{end}}
									{{else}}
										<td class="center-align"><a href="{{.Path}}" target="_blank"><i class="fa fa-download" aria-hidden="true"></i></a></td>
									{{end}}
								</tr>
							{{end}}
						</tbody>
					</table>
				</div>
				<div class="col s12 footer">
					<div class="center-align">
						<span>Powered by <a href="https://github.com/libsgh/PanIndex" target="_blank">PanIndex</a> | Themes by <a href="https://github.com/kasuganosoras">Akkariin</a></span>
					</div>
				</div>
			</div>
		</div>
		{{end}}
		<div id="example1"></div>
	</body>
	<script>var HerokuappUrl = {{.HerokuappUrl}}</script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"></script>
	<script src="/static/js/main189.js"></script>
</html>